package com.yupi.usercenter.demo;

import org.apache.xmlbeans.impl.xb.xsdschema.Public;

import java.util.function.Function;
import java.util.function.IntBinaryOperator;
import java.util.function.IntConsumer;
import java.util.function.IntPredicate;

public class LambdaDemo {
    public static void main(String[] args) {
    foreachArr(value -> System.out.println(value)
    );
    }
    public static void foreachArr(IntConsumer consumer){
        int []arr = {1,2,3,4,5,6,7,8,9,10};
        for (int i : arr) {
            consumer.accept(i);
        }
    }
}